<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Test Score</title>
</head>
<body>
<h1>Test Score</h1>
<form action="<%=request.getContextPath()%>/getScore" method="post">
    <label for="number">Enter a number:</label>
    <input type="number" id="num" name="num" required>
    <input type="submit" value="Submit">
</form>
<c:if test="${not empty param.error}">
    <p style="color:red;">Error: Division by zero is not allowed.</p>
</c:if>

<br/>
<hr>
<form action="<%=request.getContextPath()%>/getString" method="post">
    <label for="number">Enter a number:</label>
    <input id="number" name="num" required>
    <input type="submit" value="Submit">
</form>

<br/>
<hr>
<a href="<%=request.getContextPath()%>/diyException">点击测试自定义异常</a>

<br/>
<hr>
<a href="<%=request.getContextPath()%>/testException03">点击统一异常</a>

<br/>
<hr>
<a href="<%=request.getContextPath()%>/testException04">点击未知异常</a>
</html>